Computerized control apparatus for controlling many manufacturing processes and techniques is now in widespread use. Typically, a control computer system interfaces with a manufacturing process by means of data acquisition and signal generation devices. Data acquisition devices sample selected variables in the manufacturing process at predetermined intervals and convert the measured variables into digital codes suitable for use by the computer. Alternatively signal generation devices are used to translate the digital codes produced by the computer into analog signals suitable for controlling the manufacturing process.
In some systems, the measured variables are transferrred to the computer system's main memory. The processor then performs computations on the data in main memory and provides output signals which can be used to control the ongoing process. In other systems, incoming data from the sampling circuits is transferred from main memory to a secondary storage unit and later retrieved for analysis. This latter method is typically used when data rates exceed the real-time processing capabilities of the system.
In the latter type of data acquisition system, data is sampled at a steady rate and each sample is temporarily stored in the data acquisition device before being transferred to a plurality of temporary storage or buffer areas located in the computer's main memory. Generally, in order to reduce the processing requirements on the main computer the transfer of data from the data acquisition device to the storage area is performed by a direct memory access (DMA) unit. This well-known unit contains the logic circuitry to generate the necessary address information and commands to transfer information from the data acquisition device to the storage area without direct intervention by the computer system. In order to initiate a DMA transfer, the computer sends the DMA unit the starting address of a buffer memory at which to begin storing the transferred information and the number of information words to be transferred (called the word count). The computer then enables the DMA unit which independently performs the transfers. The DMA unit then monitors the number of words transferred and when the specified number have been transferred, the DMA unit stops transferring data and notifies the computer system by a standard interrupt procedure. The computer then provides the DMA unit with the starting address of a new buffer area and the new word count and restart the unit. After the DMA unit has been enabled, the computer may usually perform other calculations.
When the buffer memory areas in the computer's memory become filled, the data is transferred by another DMA unit to a large secondary storage located on the computer's peripheral bus. In order to provide for continous transfer of information between the data acquisition device and the secondary storage a technique known as "double-buffering" is used. In this technique at least two separate buffer memory areas are used for transfer of data. Since the buffer areas are separate, data can be transferred from a data acquisition device to a first buffer area under control of one DMA unit while data is simultaneously being transferred from the second buffer area to the secondary storage unit under control of the other DMA unit. Since data transfer from a buffer memory to the secondary storage is generally faster than data transfer from the data acquisition device, the second buffer generally becomes empty before the first buffer is filled so that when the first buffer does become filled, new incoming information can be transferred to the empty second buffer while the first buffer is being emptied.
However, in a control system in which data is being sampled at a rapid, steady rate, it is possible to "lose" data samples if the time between data samples is less than the time required to restart a DMA transfer operation. Data loss occurs because the DMA process stops after an interrupt has been generated and a typical data acquisition unit contains very limited storage capabilities, therefore, any data which is sampled before the DMA process is restarted is not transferred to main memory. The time to restart the DMA proces is generally the sum of the maximum time the computer requires to recognize and service an interrupt and the time required to execute the routine which loads the DMA unit with the address and word count information and enables the transfer operation.
A corresponding problem occurs when data is being transferred from the buffer storage area to a signal generation device where the translated data is being used to control an ongoing process. If the transfer rate exceeds the time required to restart the DMA process when one buffer memory has been emptied, an interruption in data flow (generally called a data "underrun" or "delay") will occur. In some systems a small data delay is not serious, but in other systems it can produce catastophic results.
In order to eliminate data losses and delays, several prior art schemes have been developed. One conventional arrangement is to provide a "dual-port" memory in the data acquisition or translation device. With a dual-port memory, data can be stored and retrieved simultaneously via the two separate ports. Thus data can be transferred from the buffer area to the memory through one port and simultaneously removed from the memory from another port before the memory has become filled.
A similar scheme uses a first in, first out (FIFO) buffer memory located in the data acquisition or translation units. In this arrangement, data can also be stored and withdrawn simultaneously from the FIFO memory.
Other prior art systems have used two independent DMA controllers to control transfers between the data acquisition device and the buffer areas so that a second DMA operation can be started before the first DMA unit has finished emptying or filling a buffer area.
The problem with the above prior art techniques is that the all require complex circuitry in each of the data acquisition or translation units. Since a typical control system may incorporate a large number of such units, the cost of providing special memories or dual DMA units becomes prohibitive. In addition, the extra circuitry requires space on the data transfer unit printed circuit boards where such space is often severely limited.
It is therefore an object of the present invention to provide a data transfer system in which data can be transferred between a computer system and data acquisition or translation units continuously at any speed up to nearly the computer system throughput limitation without introducing any data losses or delays.
It is a another object of the present invention to provide a continuous data transfer system which utilizes only single port memories and does not require complex circuitry.
It is yet another object of the present invention to provide a data transfer system which can be completely controlled from the computer system via a software routine.